home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Tools & Apps / OS⁄Toolbox / Apple Events / CallFinder Tool 1.0 / CallFinder docs next >
Encoding:
Text File  |  1991-07-26  |  5.2 KB  |  127 lines  |  [TEXT/MPS ]

  1. ********************************************************************************
  2.  
  3. CallFinder - send an AppleEvent to the Finder
  4.  
  5.     CallFinder communicates with the Finder, using AppleEvents. The tool follows 
  6.     the guidelines for Finder Events in the AppleEvent Registry, allowing users 
  7.     to enter the ID and the parameters of the AppleEvent. CallFinder thus allows 
  8.     many Finder functions to be controlled from MPW, and can be considered a step
  9.     towards User Scripting. The Commando interface for this tool is fully
  10.     implemented; the only external information required is the event ID itself 
  11.     (a list of which can be printed by calling CallFinder without parameters).
  12.     
  13.     Note: this tool requires at least System 7 and MPW 3.3. Users of earlier
  14.     versions of MPW may use this tool with modification to MPW. (see below)
  15.     
  16. ********************************************************************************
  17.  
  18. NOTE TO USERS OF MPW 3.2 AND EARLIER: In order to send AppleEvents from MPW,
  19.     you must set the "High-level event aware" bit in the 'SIZE' resource (id -1)
  20.     of your MPW Shell. If this bit is Ø, CallFinder will have no effect on the 
  21.     Finder. The side effect of setting this bit for pre-3.3 MPW is that you will
  22.     be unable to open MPW documents from the System 7 Finder.
  23.     
  24.     MPW 3.3, when released, should already have this bit set.
  25.     
  26. ********************************************************************************
  27.  
  28. Usage: CallFinder [option…]
  29.  
  30.     pathname        Specify a file or folder for the Finder. This is referred to
  31.                     as the 'selection', and is the subject of any action.
  32.     -d pathname        Specify the destination folder. This is where the file/folder
  33.                     is copied or moved to.
  34.     -e type            Specify an event ID. The parameter is a 4 character string
  35.     -k number        Specify a keyword for the AppleEvent. The parameter is a long
  36.                     integer.
  37.     -h number        Specify a horizontal coordinate or offset. The parameter is a
  38.                     short integer.
  39.     -v number        Specify a vertical coordinate or offset. The parameter is a
  40.                     short integer.
  41.     -g                Specify the Get Info window of the selection.
  42.     -s                Specify the Sharing window of the selection.
  43.     -m                Stay in MPW, without switching to the Finder.
  44.     -c                Allow a custom event to be sent, by disabling parameter
  45.                     checking by this tool. CAUTION - this is an untested feature.
  46.                     Note for AE Registry readers: Custom events will use the 
  47.                     enclosing folder parameter, not the FWindow parameter.
  48.  
  49. ********************************************************************************
  50.  
  51. 7.0 Finder Events
  52.  
  53.     Event ID    Finder Action            Parameters Required
  54.     ————————————————————————————————————————————————————————
  55.     'abou'        About This Macintosh…    none
  56.     'view'        Change window view        selection, keyword
  57.     'clos'        Close window            selection
  58.     'drag'        Copy selection to dest    selection, destination
  59.     'sdup'        Duplicate                  selection
  60.     'empt'        Empty trash                none
  61.     'sinf'        Get Info                selection
  62.     'grow'        Grow window                selection, h & v coordinates
  63.     'sali'        Make alias                selection
  64.     'move'        Move selection to dest    selection, destination
  65.     'sope'        Open selection            selection
  66.     'pgsu'        Page Setup…                selection
  67.     'posn'        Position window            selection, h&v coordinates
  68.     'spri'        Print selection            selection
  69.     'pwin'        Print window            selection
  70.     'sput'        Put Away                 selection
  71.     'rest'        Restart                    none
  72.     'srev'        Reveal selection        selection
  73.     'sprv'        Sharing…                selection
  74.     'shcl'        Show clipboard            none
  75.     'shut'        Shutdown                none
  76.     'slep'        Sleep                    none
  77.     'zoom'        Zoom window                selection, keyword
  78.  
  79. Event / Parameter notes:
  80.     'drag',
  81.     'move':        H&V parameters specify the item's coordinates in the destination.
  82.     'grow':        The h&v parameters specify the new size of the window.
  83.     'posn':        The h&v parameters specify the new location of the window.
  84.     'slep'        Only works if the Finder has a "Sleep" command available. 
  85.     'srev'        Reveals the specified file/folder in the Finder by opening its
  86.                 parent folder and selecting the item.
  87.     'view':        The keywords for the window view are:
  88.                     Small Icon    0            Icon        1
  89.                     Name        2            Date        3
  90.                     Size        4            Kind        5
  91.                     Comment        6            Label        7
  92.                     Version        8                
  93.     'zoom':        The keywords for zooming windows are:
  94.                     Zoom current size    7
  95.                     Zoom full size        8
  96.  
  97. ********************************************************************************
  98.  
  99. CallFinder ideas:
  100.  
  101. • Play a sound when a compile is finished:
  102.     CallFinder 'HD:Sounds:Excellent!' -e sope -m    (Try adding to a make file)
  103.     
  104. • Display the current window's folder in the Finder (VERY useful)
  105.     CallFinder "{active}" -e srev
  106.     
  107. • Open an alias to a remote volume
  108.     CallFinder 'HD:Aliases:DTS Goodies on Dev CD alias' -e sope
  109.     
  110. • Print a folder's contents
  111.     CallFinder 'HD:Source:' -e sope -m        # Opens the folder in the Finder
  112.     CallFinder 'HD:Source:' -e zoom -k 8 -m    # Zooms window to show all files
  113.     CallFinder 'HD:Source:' -e view -k 2 -m    # Changes view to 'View by Name'
  114.     CallFinder 'HD:Source:' -e pwin            # Calls Print Window…
  115.  
  116. • Print a file's Get Info window
  117.     CallFinder 'HD:MyApp' -e sinf -m        # Calls Get Info… for MyApp
  118.     CallFinder 'HD:MyApp' -e pwin -g        # Calls Print Window…
  119.  
  120. ********************************************************************************
  121.  
  122. CallFinder 1.0        7/26/91
  123. by Jason Swartz
  124. Developed at Apple Computer
  125. Dept. 27/5752, Apple SQE
  126. Thanks to Dennis Gately & Don Olson for their help with Finder events
  127.